package com.goodving.guli.activity;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;

import com.goodving.guli.bt.C0668a;
import com.goodving.guli.fragment.StatisticFragment;
import com.goodving.guli.model.Keeper;

/**
 * Created by john on 2015/12/7.
 */
public class StatisticActivity extends SystemBarTintActivity {
    public static final String EXTRA_SYNC_ACTION = "sync_action";
    private StatisticFragment f9342a;

    protected boolean isExceptForMiNote() {
        return true;
    }

    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        disableAutoApplyStatusBarTint();
        Intent intent = getIntent();
        Bundle bundle2 = null;
        if (intent != null) {
            bundle2 = intent.getExtras();
        }
        this.f9342a = (StatisticFragment) Fragment.instantiate(this, StatisticFragment.class.getName(), bundle2);
        FragmentTransaction beginTransaction = getFragmentManager().beginTransaction();
        beginTransaction.replace(16908290, this.f9342a);
        beginTransaction.commit();
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (keyEvent.getAction() == 0) {
            switch (i) {
                case 21 /*21*/:
                    this.f9342a.f9384b.m8558f();
                    return true;
                case 22 /*22*/:
                    this.f9342a.f9384b.m8560g();
                    return true;
            }
        }
        return super.onKeyDown(i, keyEvent);
    }

    protected void onPause() {
        super.onPause();
        C0668a.m8138b((Activity) this);
    }

    protected void onResume() {
        super.onResume();
        long j = Keeper.readPersonInfo().uid;
        C0668a.m8124a((Activity) this);
    }
}
